<template>
	<view>
		<u-popup :show="popuo_show" round="20rpx" @close="onClose()" mode="bottom" bgColor="#ffffff">
			<view class="select-wrap">
				<view class="title-line">
					<text class="title">检测报告</text>
					<image src="@/static/images/close.png" class="close-ioc" @click="onClose()"></image>
				</view>
				<scroll-view scroll-y="true" class="scroll-y">
					<view class="html-view">
						<u-parse :content="formatRichText(detection_content)"></u-parse>
						<!-- <rich-text :nodes="formatRichText(detection_content)" preview></rich-text> -->
					</view>
				</scroll-view>


			</view>
			<i-toast ref="iToast"></i-toast>
		</u-popup>

	</view>
</template>

<script>
	export default {

		data() {
			return {
				popuo_show: false,
				id: null,
				detection_content: "",
			};
		},
		methods: {
			show(detection_content) {
				this.detection_content = detection_content
				this.popuo_show = true
			},

			onClose() {
				this.popuo_show = false;
				this.$emit("close");
			},

		},

	}
</script>

<style lang="scss" scoped>
	.select-wrap {
		display: flex;
		flex-direction: column;

		.title-line {
			position: relative;
			display: flex;
			align-items: center;
			justify-content: center;
			padding: 30rpx;
			border-bottom: 1px solid #E5E5E5;

			.title {
				font-size: 32rpx;
				color: #333333;
			}

			.close-ioc {
				position: absolute;
				right: 30rpx;
				width: 26rpx;
				height: 26rpx;
			}
		}
	}

	.scroll-y {
		height: 70vh;
	}

	.html-view {
		padding: 30rpx 30rpx 50rpx;
	}
</style>